package cn.b.sky.form.model;

import cn.b.sky.user.model.Attachment;


/**
 * 
 * <strong>Title : BusinessAttachment.java<br></strong>
 * <strong>Package : cn.b.sky.form.model<br></strong>
 * <strong>Description : </strong>业务附件实体SZ_BUSINESSATTACHMENT<br> 
 * <strong>Create on : 2016-11-25 下午5:27:55<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人|修改日期|修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class BusinessAttachment extends Attachment{
    /** 
  * @Fields serialVersionUID :
  * @creator     :lidapeng
  */ 
  private static final long serialVersionUID = 1L;

    /**
     *   ID
     * Column: SZ_BUSINESSATTACHMENT.ID
     */
    private Long id;

    /**
     *   业务ID,关联业务表的id
     * Column: SZ_BUSINESSATTACHMENT.BUSINESSID
     */
    private Long businessid;

    /**
     *   工厂编号
     * Column: SZ_BUSINESSATTACHMENT.SITECODE
     */
    private String siteCode;

    /**
     *   业务类型
     * Column: SZ_BUSINESSATTACHMENT.BUSINESSTYPE
     */
    private String businessType;

    /**
     *   业务字段
     * Column: SZ_BUSINESSATTACHMENT.BUSINESSFIELD
     */
    private String businessField;

    /**
     *   附件编号（存储名）
     * Column: SZ_BUSINESSATTACHMENT.ATTACHMENTCODE
     */
    private String attachmentCode;

    /**
     *   文件名
     * Column: SZ_BUSINESSATTACHMENT.FILENAME
     */
    private String fileName;

    
    public BusinessAttachment() {
      super();
    }

    public BusinessAttachment(Long businessid, String siteCode, String businessType, String businessField) {
      super();
      this.businessid = businessid;
      this.siteCode = siteCode;
      this.businessType = businessType;
      this.businessField = businessField;
    }

    public Long getId() {
      return id;
    }

    public void setId(Long id) {
      this.id = id;
    }

    public Long getBusinessid() {
      return businessid;
    }

    public void setBusinessid(Long businessid) {
      this.businessid = businessid;
    }

    @Override
    public String getSiteCode() {
      return siteCode;
    }

    @Override
    public void setSiteCode(String siteCode) {
      this.siteCode = siteCode;
    }

    public String getBusinessType() {
      return businessType;
    }

    public void setBusinessType(String businessType) {
      this.businessType = businessType;
    }

    public String getBusinessField() {
      return businessField;
    }

    public void setBusinessField(String businessField) {
      this.businessField = businessField;
    }

    @Override
    public String getAttachmentCode() {
      return attachmentCode;
    }

    @Override
    public void setAttachmentCode(String attachmentCode) {
      this.attachmentCode = attachmentCode;
    }

    @Override
    public String getFileName() {
      return fileName;
    }

    @Override
    public void setFileName(String fileName) {
      this.fileName = fileName;
    }

    @Override
    public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((attachmentCode == null) ? 0 : attachmentCode.hashCode());
      result = prime * result + ((businessField == null) ? 0 : businessField.hashCode());
      result = prime * result + ((businessType == null) ? 0 : businessType.hashCode());
      return result;
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj) {
        return true;
      }
      if (obj == null) {
        return false;
      }
      if (getClass() != obj.getClass()) {
        return false;
      }
      BusinessAttachment other = (BusinessAttachment) obj;
      if (attachmentCode == null) {
        if (other.attachmentCode != null) {
          return false;
        }
      } else if (!attachmentCode.equals(other.attachmentCode)) {
        return false;
      }
      if (businessField == null) {
        if (other.businessField != null) {
          return false;
        }
      } else if (!businessField.equals(other.businessField)) {
        return false;
      }
      if (businessType == null) {
        if (other.businessType != null) {
          return false;
        }
      } else if (!businessType.equals(other.businessType)) {
        return false;
      }
      return true;
    }
    
    
}